<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<script type="text/javascript">
<function Node(sum)
{
  this.num=num;
  this.count=1;
  this.pleft=null;
  this.pRight=null;
}

function createNode(value)
{
  var pNode=new Node(value);
  pNode.num=value;
  pNode.count=1;
  pNode.pLeft=null;
  pNode.pPight=null;0
  return pNode{
  if(pNode==null){
    pNode.count++;
    return pNode;
  }
  if(value<pNode.num){
    if(pNode.pLeft==null){
      pnode.pLeft=createNode(value);
      return pNode.pLeft;
    }else {
      return addNode(value,pNode.pLeft);
    }
    else {

    }
      if(pNode.pRight==null){
        pNode.pRight=createNode(value);
        return pnode.pRight;
      }else{
        return addnode(value,pNode.pRight);
      }
    }
  }

  var list=[10,8,15,2,14,16,20,7,5,13,60,34,1,10];
  var pRoot=null;
  var lent=list.length;
  for(var i=0;i<lent;i++){
    if(pRoot==null){
      pRoot=createNode(list[i]);
    }else{
      addNode(list[i],pRoot);
    }
  }
  console.info(pRoot);
  </script>
  </body>
  </html>
